home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / INSTALL.TXT < prev    next >
Encoding:
Text File  |  1999-07-20  |  4.1 KB  |  124 lines

  1. ZServer Installation
  2. --------------------
  3.  
  4. Requirements
  5.  
  6.   ZServer comes with Zope 2. Though ZServer can be used with earlier
  7.   versions of Zope, this is not supported and not covered by this
  8.   document.
  9.  
  10. Configuration
  11.  
  12.   To run ZServer you simply execute the z2.py start script which is
  13.   located in your Zope directory. You can pass commandline arguments
  14.   to the start script in order to run Zope with different options. In
  15.   order to see a list of options use the '-h' help option.
  16.   
  17.   Here's an example of use::
  18.   
  19.     $ python1.5.2 z2.py -w 8888 -f "" -p "" -m "" &
  20.     
  21.   This example starts Zope using a web server on port 8888. It does
  22.   not start and FTP server, or a PCGI server, or a Monitor server. It
  23.   also starts the server running in the backaground.
  24.   
  25. Shell scripts and batch files  
  26.   
  27.   You may also wish to create a shell script (or batch file under
  28.   win32) to set environment variables (such as ZOPE_DEBUG_MODE and
  29.   PYTHONHOME) and run the start script. 
  30.   
  31.   Here's an example shell script for a binary Zope release::
  32.   
  33.     ZOPE_DEBUG_MODE=1
  34.     export ZOPE_DEBUG_MODE
  35.     PYTHONHOME=/home/Zope
  36.     export PYTHONHOME
  37.     /home/Zope/bin/python /home/Zope/z2.py -w 9673 &
  38.   
  39.   Note: If ZServer fails because it can't find some standard Python
  40.   libaries there's a good bet that you need to set the PYTHONHOME as
  41.   shown above.
  42.   
  43.   Here's an example batch file::
  44.   
  45.     set ZOPE_DEBUG_MODE=1
  46.     "\Program Files\Zope\bin\python"  "\Program Files\Zope\z2.py -w
  47.     8888 -f 8021"
  48.   
  49.   Now you're ready to go.  
  50.  
  51. Starting ZServer
  52.  
  53.   To start ZServer run the start script::
  54.   
  55.     $ python1.5.2 z2.py
  56.     
  57.   To stop the server type 'control-c'.
  58.  
  59.   Note: If you've created a shell script or batch file to run ZServer
  60.   use that instead.
  61.  
  62.   You should see some Medusa information come up on the screen as Zope
  63.   starts.
  64.   
  65.   A log file will be written to the 'var' directory, named
  66.   'Z2.log' by default.
  67.  
  68. Using ZServer
  69.  
  70.   Once you start ZServer is will publish Zope (or any Python module)
  71.   on HTTP and/or FTP. To access Zope via HTTP point your browser at
  72.   the server like so::
  73.   
  74.     http://www.example.com:9673/
  75.     
  76.   This assumes that you have chosen to put HTTP on port 9673 and that
  77.   you are publishing a module named whose URL prefix is set to ''.
  78.   
  79.   Note: to publish Zope normally you publish the 'lib/python/Zope.py'
  80.   module.
  81.  
  82.   To access Zope via FTP you need to FTP to it at the port you set FTP
  83.   to run on. For example::
  84.   
  85.     ftp www.example.com 9221
  86.  
  87.   This opens a FTP session to your machine on port 9221, ZServer's
  88.   default FTP port. When you are prompted to log in you should supply
  89.   a Zope username and password. (Probably you should use an account
  90.   with the 'Manager' role, unless you have configured Zope to allow
  91.   FTP access to the 'Anonymous' role.) You can also enter 'anonymous'
  92.   and any password for anonymous FTP access. Once you have logged in
  93.   you can start issuing normal FTP commands.
  94.   
  95.   Right now ZServer supports most basic FTP commands.
  96.   
  97.   Note: When you log in your working directory is set to '/'. If you
  98.   do not have FTP permissions in this directory, you will need to 'cd'
  99.   to a directory where you have permissions before you can do
  100.   anything. See above for more information about logging into FTP.
  101.  
  102. Advanced Usage: zdaemon.py and the Zope NT service.
  103.  
  104.   One problem you may notice with ZServer is that once the server is
  105.   shutdown, either through the web management interface, or by some
  106.   other means, it will not automatically be restarted.
  107.   
  108.   On Unix you can use zdeamon.py to keep Zope running. Specifying
  109.   the '-Z' switch when starting Zope runs zdaemon.py. Zdeamon
  110.   will restart Zope when it Zope is restarted through the web, and in
  111.   case of an unexpected error.
  112.   
  113.   On NT, use the Zope service for the same functionality. See ZServer.py
  114.   for more information on running ZServer as a service.
  115.  
  116. Where to go from here
  117.  
  118.   Check out the README.txt file. It contains information on what
  119.   ZServer can do, how it works and and what you can do if you run into
  120.   problems.
  121.   
  122.   And don't forget to have fun!
  123.   
  124.